package com.lwf.smartseniorcare.repository;

import com.lwf.smartseniorcare.entity.Elderly;
import com.lwf.smartseniorcare.entity.User;
import org.springframework.data.jpa.repository.JpaRepository;
import org.springframework.stereotype.Repository;

import java.util.List;

@Repository
public interface ElderlyRepository extends JpaRepository<Elderly, Long> {
    List<Elderly> findByCaretaker(User caretaker);
    List<Elderly> findByActive(boolean active);
    List<Elderly> findByNameContainingIgnoreCase(String name);
}
